1. Field of the Invention
The present invention relates to transmission apparatuses and methods, reception apparatuses and methods, storage media, and programs. More particularly, the present invention relates to a transmission apparatus and a method therefor, a reception apparatus and a method therefor, a recording medium, and a program which allow data containing redundant data to be more efficiently transmitted in accordance with the state of a communications network.
2. Description of the Related Art
Nowadays, services that are provided through transmission of video data or audio data via various communication media, such as the Internet, are widely available. In recent years, particularly, in addition to services using a download transmission scheme, services using a streaming transmission scheme are increasingly becoming popular.
In the streaming transmission services, a transmission apparatus sequentially transmits data and a reception apparatus receives the data transmitted from the transmission apparatus and simultaneously plays back video or audio based on the received data. The streaming transmission scheme is typically applied to Internet telephones, remote TV conference services, and internet-based services such as video-on-demand services.
In the streaming transmission scheme, data transmitted from a transmission apparatus is commonly referred to as “streaming data”.
When moving-image streaming data or audio streaming data is transmitted through a transmission path, such as the Internet, that does not guarantee the arrival of the data, packet loss can occur due to an increased transmission load.
As a result of the packet loss, the receiving side suffers from disturbance of moving-image data played back and/or interruption of audio played back.
To solve the problem, a method in which redundant data is transmitted together with the streaming data to allow the receiving side correct error of lost packets has been used. One example is an FEC (forward error correction) scheme. In the FEC scheme, a plurality of redundant packets are generated for a group of packets and are transmitted together with the group of packets. When any packet is lost from packets belonging to the group, the receiving side uses the redundant packets to correct error for the lost packet(s).
For example, as shown in FIG. 1, a transmitting side adds two redundant packets, i.e., FEC packets 2-1 and 2-2 to a group of five packets, i.e., data packets. 1-1 to 1-5 and transmits the resulting packets to a receiving side. The FEC packets 2-1 and 2-2 are generated by performing an exclusive-OR (XOR) operation on a given combination of the data packets 1-1 to 1-5.
For example, when the data packet 1-2 is lost on a transmission path, the receiving side performs an XOR operation on the data packet 1-1 and the FEC packet 2-1 to recover the data packet 1-2.
In the example shown in FIG. 1, error of lost packets the number of which being equal to the number of FEC packets 2-1 and 2-2 can be corrected. That is, when one or two of the data packets 1-1 to 1-5 are lost, the packet(s) can be recovered.
An FEC scheme may be used to generate redundant data for a group for one frame. However, when software is used to generate the redundant data, there is a problem in that a considerably high load is put on the processing.
FIG. 2 illustrates the sequence of transmission of the group of the data packets 1-1 to 1-5 and the redundant packets of the FEC packets 2-1 and 2-2. The horizontal direction in FIG. 2 indicates time.
For transmission of the group of the data packets 1-1 to 1-5 and the redundant packets of the FEC packets 2-1 and 2-2, first, the data packets 1-1 to 1-5 are sequentially transmitted and then the FEC packets 2-1,and 2-2 are sequentially transmitted.
FIG. 3 is a flow chart showing known processing for transmitting packets with FEC packets. In step S11, the transmission apparatus initializes an internal timer.
In step S12, based on the timer value, the transmission apparatus determines whether or not the timer has expired. When the timer has not expired, the determination processing in step S12 is repeated until when the timer expires.
When it is determined that the timer has expired in step S12, this means that a period of time corresponding to one frame has elapsed. The process then proceeds to step S13, in which the transmission apparatus captures video data supplied. In step S14, the transmission apparatus encodes the captured image data.
In step S15, the transmission apparatus generates RTP (real-time transport protocol) packets, which are data packets that contain the encoded video data. In step S16, the transmission apparatus transmits the;RTP packets to a receiving side.
In step S17, based on the RTP packets, the transmission apparatus generates an FEC packet. In step S18, the transmission apparatus transmits the FEC packet to the receiving side.
In step S19, the transmission apparatus updates a timestamp added to the RTP packets. In step S20, the transmission apparatus sets the internal timer. The process then returns to step S12 and the above-described processing is repeated.
Japanese Unexamined Patent Application Publication No. 2000-224226 discloses a related technology. A transmitting side generates an information block of each packet so that the block has a portion common to the information blocks of a preceding packet and a subsequent packet, encodes the information block by error correction coding, and transmits the encoded information block. The size of the common portion is varied depending on the state of a transmission path. A receiving side, on the other hand, corrects error of the information block by using decode and error correction functions. When the receiving side fails in decoding, it replaces the common portion of the information block with the common portion of the preceding packet and performs decoding and error correction again on the information block in which the common portion has been replaced.
Japanese Unexamined Patent Application Publication No. 2003-179580 discloses a system for performing error correction control based on the state of a network monitored by a network monitoring unit during packet transmission. This system executes packet transfer by dynamically changing modes, such as error control based on an FEC scheme or error correction based on playback request processing (ARQ: automatic repeat request), in accordance with packet loss and error occurrence state in the network. For example, when the RTT (round-trip time) is short, the system selects the ARQ-based error correction, and when the RTT is long, the system selects the FEC-based error correction, thereby allowing dynamic error-correction control.
However, always transmitting redundant packets together with streaming data involves transmission of unwanted data.
In addition, since how much packet loss is occurring cannot be figured out in the network, the known approaches have a problem in determination as to how many redundant packets are to be transmitted.